project(RMTPose)

# 添加子目录
add_subdirectory(onnxruntime_cpu_model_base)
add_subdirectory(rtmpose_utils)
add_subdirectory(rtmdet_onnxruntime)
add_subdirectory(rtmpose_onnxruntime)
add_subdirectory(rtmpose_tracker_onnxruntime)

# # 当使用 MSVC 编译器时, 设置输入代码的编码格式为 utf-8
# add_compile_options("$<$<C_COMPILER_ID:MSVC>:/source-charset:utf-8>")

# 可执行文件
add_executable(${PROJECT_NAME} main.cpp)

# 添加可执行文件所需的头文件
target_include_directories(${PROJECT_NAME} PUBLIC ${RTMPoseUtils_Dir})
target_include_directories(${PROJECT_NAME} PUBLIC ${OnnxruntimeCpu_Dir})
target_include_directories(${PROJECT_NAME} PUBLIC ${RTMDetonnxruntime_Dir})
target_include_directories(${PROJECT_NAME} PUBLIC ${RTMPoseonnxruntime_Dir})
target_include_directories(${PROJECT_NAME} PUBLIC ${RTMPoseTrackeronnxruntime_Dir})


# 链接动态库
target_link_libraries(${PROJECT_NAME} PUBLIC rtmpose_utils)
target_link_libraries(${PROJECT_NAME} PUBLIC onnxruntime_cpu)
target_link_libraries(${PROJECT_NAME} PUBLIC rtmdet_onnxruntime)
target_link_libraries(${PROJECT_NAME} PUBLIC rtmpose_onnxruntime)
target_link_libraries(${PROJECT_NAME} PUBLIC rtmpose_tracker_onnxruntime)